package tech.aistar.corejava.day09.Equals;

import tech.aistar.corejava.day09.Point;

/**
 * Created by 李雨昂 on 2019/7/26.
 */
public class TestRewriteEquals {
    public static void main(String[] args) {
        RewriteEquals r1 = new RewriteEquals(1);
        RewriteEquals r2 = new RewriteEquals(1,"110",2);
        System.out.println(r1.equals(r2));

        //非空性判断
        System.out.println(r1.equals(null));

        //自反性判断
        System.out.println(r1.equals(r1));

        //一致性判断
        System.out.println(r1.equals(r2));

        //考虑equals底层强制类型转换 - 类型转换
        Point p = new Point();
        System.out.println(r1.equals(p));
    }
}
